package com.itlong.cloud.project.property;

import com.itlong.cloud.POJO.DTO.property.PropertyProjectUpdateArrearageLinkageDTO;
import com.itlong.cloud.POJO.VO.property.PropertyArrearageLinkageVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <desc>
 *      物业欠费联动接口协议提供对象
 * </desc>
 *
 * @createDate 2019-01-22
 */
@FeignClient(name = "project-service")
public interface IPropertyArrearageLinkageServiceClient {

    /**
     * <desc>
     *    获取欠费联动设置信息
     * <desc/>
     *
     * @param  projectId  项目编号
     * @return  PropertyArrearageLinkageVO 欠费联动信息
     * @author Qiang.S
     * @createDate 2019/01/22
     */
    @PostMapping(path = "/arrearage/linkage/getArrearageLinkageInfo")
    PropertyArrearageLinkageVO getArrearageLinkageInfo(@RequestParam("projectId") String projectId) throws Exception;

    /**
     * <desc>
     *      更新欠费联动信息
     * <desc/>
     *
     * @param dto 欠费联动信息
     * @return 受影响的行数
     * @author Qiang.S
     * @createDate 2019/01/22
     */
    @PostMapping(path = "/arrearage/linkage/updateArrearageLinkageInfo")
    PropertyArrearageLinkageVO updateArrearageLinkageInfo(@RequestBody PropertyProjectUpdateArrearageLinkageDTO dto) throws Exception;

    /**
     * <desc>
     *      更新欠费联动信息
     * <desc/>
     *
     * @param projectId 项目编号
     * @return 欠费者电话号
     * @author Qiang.S
     * @createDate 2019/01/22
     */
    @PostMapping(path = "/arrearage/linkage/getArrearagePhoneNum")
    List<String> getArrearagePhoneNum(@RequestParam("projectId") String projectId) throws Exception;
}
